/* @(#)NodeQualityNormalizedDescription.java
** 
** Copyright (C) 2012 by Steven D. Stamps
**
**             Trademarks & Copyrights
** Flywheel Management Science(TM), Flywheel Management Model(TM),
** Flywheel Story Editor(TM) and FlywheelMS(TM) are exclusive trademarks
** of Steven D. Stamps and may only be used freely for the purpose of
** identifying the unforked version of this software.  Subsequent forks
** may not use these trademarks.  All other rights are reserved.
** and FlywheelMS(TM) are exclusive trademarks of Steven D. Stamps
** and may only be used freely for the purpose of identifying the
** unforked version of this software.  Subsequent forks (if any) may
** not use these trademarks.  All other rights are reserved.
**
** DecKanGL (Decorated Kanban Glyph Language) and TribKn (Tribal Knowledge)
** are also exclusive trademarks of Steven D. Stamps.  These may be used
** freely within the unforked FlywheelMS application and documentation.
** All other rights are reserved.
**
** Trademark information is available at
** <http://www.flywheelms.com/trademarks>
**
** Flywheel Management Science(TM) is a copyrighted body of management
** metaphors, governance processes, and leadership techniques that is
** owned by Steven D. Stamps.  These copyrighted materials may be freely
** used, without alteration, by the community (users and developers)
** surrounding this GPL3-licensed software.  Additional copyright
** information is available at <http://www.flywheelms.org/copyrights>
**
**              GPL3 Software License
** This program is free software: you can use it, redistribute it and/or
** modify it under the terms of the GNU General Public License, version 3,
** as published by the Free Software Foundation. This program is distributed
** in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
** even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
** PURPOSE.  See the GNU General Public License for more details. You should
** have received a copy of the GNU General Public License, in a file named
** COPYING, along with this program.  If you cannot find your copy, see
** <http://www.gnu.org/licenses/gpl-3.0.html>.
*/

package com.flywheelms.library.fmm.node.impl.enumerator;

import android.graphics.drawable.Drawable;

import com.flywheelms.library.FmsLibraryApplication;
import com.flywheelms.library.R;
import com.flywheelms.library.fmm.helper.FmmHelper;
import com.flywheelms.library.fmm.node.NodeId;
import com.flywheelms.library.fmm.node.interfaces.FmmEnumNode;
import com.flywheelms.library.gcg.interfaces.GcgGuiable;

public enum TribKnQualityNormalizedDescription implements FmmEnumNode {
	
	AT_RISK (R.string.tribkn_quality__normalized_description__at_risk),
	EXCESSIVE (R.string.tribkn_quality__normalized_description__excessive),
	FACILITATION_ISSUE (R.string.tribkn_quality__normalized_description__facilitation_issue),
	FUTURE (R.string.tribkn_quality__normalized_description__future),
	GOOD (R.string.tribkn_quality__normalized_description__good),
	INACTIVE (R.string.tribkn_quality__normalized_description__inactive),
	IMCOMPLETE (R.string.tribkn_quality__normalized_description__incomplete),
	MISSED (R.string.tribkn_quality__normalized_description__missed),
	MODIFIED_SINCE_CONFIRMED (R.string.tribkn_quality__normalized_description__modified_since_confirmed),
	MULTIPLE_SPECIFIED (R.string.tribkn_quality__normalized_description__multiple_specified),
	NONE (R.string.tribkn_quality__normalized_description__none),
	NOT_ENABLED (R.string.tribkn_quality__normalized_description__not_enabled),
	NOT_SCHEDULED (R.string.tribkn_quality__normalized_description__not_scheduled),
	ONE_SPECIFIED (R.string.tribkn_quality__normalized_description__one_specified),
	OVER_BUDGET (R.string.tribkn_quality__normalized_description__over_budget),
	PAST_DUE (R.string.tribkn_quality__normalized_description__past_due),
	PROPOSED (R.string.tribkn_quality__normalized_description__proposed),
	UNCONFIRMED (R.string.tribkn_quality__normalized_description__unconfirmed),
	UNSPECIFIED (R.string.tribkn_quality__normalized_description__unspecified);
	
	public static final String name_COLUMN_1 = "tribkn_quality_normalized_description";
	
	public static TribKnQualityNormalizedDescription getObjectForName(String aName) {
		for(TribKnQualityNormalizedDescription theNodeQualityNormalizedDescription : TribKnQualityNormalizedDescription.values()) {
			if(theNodeQualityNormalizedDescription.equals(aName)) {
				return theNodeQualityNormalizedDescription;
			}
		}
		return null;
	}

	private static FmmNodeDictionary fmmNodeDictionaryEntry = FmmNodeDictionary.getEntryForClass(TribKnQualityNormalizedDescription.class);
	private static String labelText = fmmNodeDictionaryEntry.getLabelText();
	private static Drawable labelDrawable = fmmNodeDictionaryEntry.getLabelDrawable();
	
	public static GcgGuiable getStaticInstance() {
		return AT_RISK;
	}

	@Override
	public String getLabelText() {
		return labelText;
	}

	@Override
	public Drawable getLabelDrawable() {
		return labelDrawable;
	}

	private NodeId nodeId;
	private int nameStringResourceId;
	private String name;
	
	TribKnQualityNormalizedDescription(int aNameStringResourceId) {
		this.nameStringResourceId = aNameStringResourceId;
		this.name = FmmHelper.getContext().getResources().getString(this.nameStringResourceId);
		this.nodeId = new NodeId(
				FmmNodeDictionary.getEntryForClass(TribKnQualityNormalizedDescription.class),
				getName() );
	}
	
	public String getName() {
		return this.name;
	}
	
	@Override
	public String getNodeIdString() {
		return getNodeId().getNodeIdString();
	}

	@Override
	public Drawable getDataDrawable() {
		return FmsLibraryApplication.getContext().getResources().getDrawable(R.drawable.null_drawable);
	}

	@Override
	public String getDataText() {
		return getName();
	}

	@Override
	public NodeId getNodeId() {
		return this.nodeId;
	}

	@Override
	public FmmNodeDictionary getFmmNodeDictionaryEntry() {
		return fmmNodeDictionaryEntry;
	}

	@Override
	public String getNodeTypeCode() {
		return getFmmNodeDictionaryEntry().getNodeTypeCode();
	}

	@Override
	public String getNodeTypeName() {
		return getFmmNodeDictionaryEntry().getNodeTypeName();
	}

}
